/*     */ package eos.moe.dragoncore.mixins;
/*     */ 
/*     */ import com.mojang.authlib.GameProfile;
/*     */ import com.mojang.authlib.properties.Property;
/*     */ import eos.moe.dragoncore.cx;
/*     */ import eos.moe.dragoncore.ex;
/*     */ import eos.moe.dragoncore.gp;
/*     */ import eos.moe.dragoncore.ld;
/*     */ import java.util.Collection;
/*     */ import java.util.List;
/*     */ import java.util.Map;
/*     */ import net.minecraft.block.state.IBlockState;
/*     */ import net.minecraft.client.Minecraft;
/*     */ import net.minecraft.client.renderer.DestroyBlockProgress;
/*     */ import net.minecraft.client.renderer.GlStateManager;
/*     */ import net.minecraft.client.renderer.RenderGlobal;
/*     */ import net.minecraft.client.renderer.tileentity.TileEntitySkullRenderer;
/*     */ import net.minecraft.tileentity.TileEntity;
/*     */ import net.minecraft.tileentity.TileEntitySkull;
/*     */ import net.minecraft.util.EnumFacing;
/*     */ import net.minecraft.util.ResourceLocation;
/*     */ import net.minecraft.util.math.BlockPos;
/*     */ import net.minecraftforge.fml.relauncher.ReflectionHelper;
/*     */ import org.jetbrains.annotations.Nullable;
/*     */ import org.spongepowered.asm.mixin.Mixin;
/*     */ import org.spongepowered.asm.mixin.Shadow;
/*     */ import org.spongepowered.asm.mixin.injection.At;
/*     */ import org.spongepowered.asm.mixin.injection.Inject;
/*     */ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
/*     */ 
/*     */ @Mixin({TileEntitySkullRenderer.class})
/*     */ public abstract class MixinTileEntitySkullRenderer
/*     */ {
/*  34 */   private static final ResourceLocation[] DESTROY_STAGES = new ResourceLocation[] { new ResourceLocation("textures/blocks/destroy_stage_0.png"), new ResourceLocation("textures/blocks/destroy_stage_1.png"), new ResourceLocation("textures/blocks/destroy_stage_2.png"), new ResourceLocation("textures/blocks/destroy_stage_3.png"), new ResourceLocation("textures/blocks/destroy_stage_4.png"), new ResourceLocation("textures/blocks/destroy_stage_5.png"), new ResourceLocation("textures/blocks/destroy_stage_6.png"), new ResourceLocation("textures/blocks/destroy_stage_7.png"), new ResourceLocation("textures/blocks/destroy_stage_8.png"), new ResourceLocation("textures/blocks/destroy_stage_9.png") };
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   private static Map<Integer, DestroyBlockProgress> damagedBlocks;
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   @Shadow
/*     */   public abstract void func_188190_a(float paramFloat1, float paramFloat2, float paramFloat3, EnumFacing paramEnumFacing, float paramFloat4, int paramInt1, @Nullable GameProfile paramGameProfile, int paramInt2, float paramFloat5);
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   @Inject(method = {"renderSkull"}, at = {@At("HEAD")}, cancellable = true)
/*     */   public void mixin_renderSkull(float f1, float f2, float f3, EnumFacing enumFacing, float f4, int i, GameProfile gameProfile, int j, float f5, CallbackInfo callbackInfo) {
/* 142 */     String str = null;
/* 143 */     if (gameProfile != null) {
/* 144 */       Collection<Property> collection = gameProfile.getProperties().get("model");
/* 145 */       if (collection.size() != 0) {
/* 146 */         Property property = collection.stream().findFirst().get();
/* 147 */         str = property.getValue();
/*     */       } 
/*     */     } 
/* 150 */     if (str == null) {
/* 151 */       str = (gameProfile != null && gameProfile.getName() != null) ? gameProfile.getName() : null;
/*     */     }
/*     */ 
/*     */     
/* 155 */     ex ex = ex.v(str);
/*     */ 
/*     */     
/* 158 */     if (str != null && str.startsWith("none|")) {
/* 159 */       callbackInfo.cancel();
/* 160 */     } else if (ex != null) {
/* 161 */       callbackInfo.cancel();
/*     */       
/* 163 */       renderModel(null, ex, f1, f2, f3, f4, j);
/* 164 */       gp.v(ex.i).clearData();
/*     */     } 
/*     */   }
/*     */ }


/* Location:              D:\fanbian\[D][龙之核心]DragonCore-2.6.0.3.jar!\eos\moe\dragoncore\mixins\MixinTileEntitySkullRenderer.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */